package beans.aplicacao;

import java.sql.SQLException;
import java.util.ArrayList;

import javax.faces.bean.ManagedBean;

import dao.aplicacao.CorKitDao;

import modelos.aplicacao.CorKitModel;

@ManagedBean(name = "corkitBean")
public class CorKitBean {
	
	private int idVersao;

	private ArrayList<CorKitModel> kits;
	private String kit;

	private ArrayList<CorKitModel> cores;
	private String cor;
	
	private CorKitDao dao = new CorKitDao();

	public int getIdVersao() {
		return idVersao;
	}

	public void setIdVersao(int idVersao) {
		this.idVersao = idVersao;
	}

	public ArrayList<CorKitModel> getKits() throws SQLException {
		kits = dao.getKitVersao(idVersao);
		return kits;
	}

	public void setKits(ArrayList<CorKitModel> kits) {
		this.kits = kits;
	}

	public ArrayList<CorKitModel> getCores() throws SQLException {
		cores = dao.getCoresVersao(idVersao); 
		return cores;
	}

	public void setCores(ArrayList<CorKitModel> cores) {
		this.cores = cores;
	}

	public String getKit() {
		return kit;
	}

	public void setKit(String kit) {
		this.kit = kit;
	}

	public String getCor() {
		return cor;
	}

	public void setCor(String cor) {
		this.cor = cor;
	}
}